package exeption;

public class ThrowDemo {
    public static void main(String[] args) {
        Person p=new Person();
       // p.setAge(20);
        try {
            p.setAge(1000);//满足语法,不满足业务01
        } catch (Exception e) {
           System.out.println("出错了");
        }
        System.out.println("此人年龄:"+p.getAge());;
    }
}
